<table border="1" cellpadding="3" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse; table-layout:fixed;word-wrap:break-word;" width="100%" class="table_common">
    <tr>
        <th rowspan="2">区域</th>
        <th rowspan="2">大区</th>
        <th rowspan="2">小区</th>
        <th rowspan="2">省份</th>
        <th rowspan="2">城市</th>
        <th rowspan="2">专营店</th>
        <th rowspan="2">专营店编码</th>
        <th rowspan="2">所属双月</th>
        <th rowspan="2">城市提升基金年度额度</th>
        <th colspan="3">城市提升活动</th>
        <?php foreach ($timeUnitList as $timeUnit => $timeUnitName) {?>
        <th colspan="7"><?=$timeUnitName?></th>
        <?php }?>
    </tr>
    <tr>
    	<th>城市提升活动年度总额度</th>
    	<th>城市提升活动已使用费用</th>
    	<th>城市提升活动剩余额度</th>
    	<?php foreach ($timeUnitList as $timeUnit => $timeUnitName) {?>
    	<th>城市提升基金剩余额度</th>
    	<th>同城巡展额度</th>
    	<th>车展外场试驾体验额度</th>
    	<th>城市提升基金结算费用</th>
    	<th>同城巡展结算费用</th>
    	<th>车展外场试驾体验结算费用</th>
    	<th>总结算费用</th>
    	<?php }?>
    </tr>
    <?php
    foreach($storeDetailList as $k => $v){
        $storeData = isset($allStoreList[$v['storeId']]) ? $allStoreList[$v['storeId']] : array();
    ?>
    <tr>
        <td><?=$storeData['area'];?></td>
        <td><?=$storeData['region'];?></td>
        <td><?=$storeData['spsarea'];?></td>
        <td><?=$storeData['province'];?></td>
        <td><?=$storeData['city'];?></td>
        <td><?=$storeData['storeName'];?></td>
        <td><?=$storeData['coding'];?></td>
        <td><?=$v['timeUnitStr']?></td>
        <td><?=$v['yearMoney']?></td>
        <td><?=$v['yearMoneyTotal']?></td>
        <td><?=$v['usedMoneyTotal']?></td>
        <td><?=$v['yearMoneyTotal']>$v['usedMoneyTotal'] ? $v['yearMoneyTotal']-$v['usedMoneyTotal'] : 0 ?></td>
        <?php foreach ($timeUnitList as $timeUnit => $timeUnitName) {?>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['unionYearSurplus'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['xunFixedMoney'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['driveFixedMoney'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['unionSettleMoney'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['xunSettleMoney'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['driveSettleMoney'] : ''?></td>
        <td><?=isset($v['timeUnitGroupDetail'][$timeUnit]) ? $v['timeUnitGroupDetail'][$timeUnit]['totalSettleMoney'] : ''?></td>
        <?php }?>
    </tr>
    <?php }?>
</table>